(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
tower(x) → f(a, x, s(0))
f(a, 0, y) → y
f(a, s(x), y) → f(b, y, s(x))
f(b, y, x) → f(a, half(x), exp(y))
exp(0) → s(0)
exp(s(x)) → double(exp(x))
double(0) → 0
double(s(x)) → s(s(double(x)))
half(0) → double(0)
half(s(0)) → half(0)
half(s(s(x))) → s(half(x))
Rewrite Strategy: FULL
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
tower(x) → f(a, x, s(0'))
f(a, 0', y) → y
f(a, s(x), y) → f(b, y, s(x))
f(b, y, x) → f(a, half(x), exp(y))
exp(0') → s(0')
exp(s(x)) → double(exp(x))
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → double(0')
half(s(0')) → half(0')
half(s(s(x))) → s(half(x))
S is empty.
Rewrite Strategy: FULL
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
TRS:
Rules:
tower(x) → f(a, x, s(0'))
f(a, 0', y) → y
f(a, s(x), y) → f(b, y, s(x))
f(b, y, x) → f(a, half(x), exp(y))
exp(0') → s(0')
exp(s(x)) → double(exp(x))
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → double(0')
half(s(0')) → half(0')
half(s(s(x))) → s(half(x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
f,
half,
exp,
doubleThey will be analysed ascendingly in the following order:
half < f
exp < f
double < half
double < exp
(6) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
double, f, half, exp
They will be analysed ascendingly in the following order:
half < f
exp < f
double < half
double < exp
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
double(
gen_0':s3_0(
n5_0)) →
gen_0':s3_0(
*(
2,
n5_0)), rt ∈ Ω(1 + n5
0)
Induction Base:
double(gen_0':s3_0(0)) →RΩ(1)
0'
Induction Step:
double(gen_0':s3_0(+(n5_0, 1))) →RΩ(1)
s(s(double(gen_0':s3_0(n5_0)))) →IH
s(s(gen_0':s3_0(*(2, c6_0))))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
half, f, exp
They will be analysed ascendingly in the following order:
half < f
exp < f
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
half(
gen_0':s3_0(
*(
2,
n253_0))) →
gen_0':s3_0(
n253_0), rt ∈ Ω(1 + n253
0)
Induction Base:
half(gen_0':s3_0(*(2, 0))) →RΩ(1)
double(0') →LΩ(1)
gen_0':s3_0(*(2, 0))
Induction Step:
half(gen_0':s3_0(*(2, +(n253_0, 1)))) →RΩ(1)
s(half(gen_0':s3_0(*(2, n253_0)))) →IH
s(gen_0':s3_0(c254_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n253_0))) → gen_0':s3_0(n253_0), rt ∈ Ω(1 + n2530)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
exp, f
They will be analysed ascendingly in the following order:
exp < f
(13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol exp.
(14) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n253_0))) → gen_0':s3_0(n253_0), rt ∈ Ω(1 + n2530)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
The following defined symbols remain to be analysed:
f
(15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol f.
(16) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n253_0))) → gen_0':s3_0(n253_0), rt ∈ Ω(1 + n2530)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
No more defined symbols left to analyse.
(17) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
(18) BOUNDS(n^1, INF)
(19) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n253_0))) → gen_0':s3_0(n253_0), rt ∈ Ω(1 + n2530)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
No more defined symbols left to analyse.
(20) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
(21) BOUNDS(n^1, INF)
(22) Obligation:
TRS:
Rules:
tower(
x) →
f(
a,
x,
s(
0'))
f(
a,
0',
y) →
yf(
a,
s(
x),
y) →
f(
b,
y,
s(
x))
f(
b,
y,
x) →
f(
a,
half(
x),
exp(
y))
exp(
0') →
s(
0')
exp(
s(
x)) →
double(
exp(
x))
double(
0') →
0'double(
s(
x)) →
s(
s(
double(
x)))
half(
0') →
double(
0')
half(
s(
0')) →
half(
0')
half(
s(
s(
x))) →
s(
half(
x))
Types:
tower :: 0':s → 0':s
f :: a:b → 0':s → 0':s → 0':s
a :: a:b
s :: 0':s → 0':s
0' :: 0':s
b :: a:b
half :: 0':s → 0':s
exp :: 0':s → 0':s
double :: 0':s → 0':s
hole_0':s1_0 :: 0':s
hole_a:b2_0 :: a:b
gen_0':s3_0 :: Nat → 0':s
Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))
No more defined symbols left to analyse.
(23) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
(24) BOUNDS(n^1, INF)